
public class StackDelegator<V extends Vertex<V>> implements DataStructure<V>{
	private java.util.Stack<Path<V>> stack;
	
	public StackDelegator()
	{
		stack = new java.util.Stack<Path<V>>();
	}

	public java.util.Stack<Path<V>> getStack() {
		return stack;
	}

	public void setStack(java.util.Stack<Path<V>> stack) {
		this.stack = stack;
	}

	@Override
	public void add(Path<V> path) {
		stack.push(path);
		
	}

	@Override
	public Path<V> remove() {
		return stack.pop();
	}

	@Override
	public boolean isEmpty() {
		return stack.isEmpty();
	}
}
